<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=no">
	<title>我发布的Chat</title>
</head>
<link rel="stylesheet" type="text/css" href="../styles/index.css">
<script type="text/javascript">
	(function (doc, win) {
        var docEl = doc.documentElement,
            resizeEvt = 'onorientationchange' in window ? 'onorientationchange' : 'resize',
            recalc = function () {
                var clientWidth = docEl.clientWidth;
                if (!clientWidth) return;
                if(clientWidth>=750){
                    docEl.style.fontSize = '20px';
                }else{
                    docEl.style.fontSize = 20 * (clientWidth / 750) + 'px';
                }
            };

        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);
</script>
<body>
	<div class="warp">

		<section class="cashList">
			<p class="title">申请列表</p>
			<div class="info">
				<ul>
					<li class="top">
						<span class="t1">金额</span>
						<span class="t2">时间</span>
						<span class="t3">状态</span>
					</li>
					<li>
						<span class="t1">1000</span>
						<span class="t2">2017-08-10</span>
						<span class="t3">审核中</span>
					</li>
					<li>
						<span class="t1">1000</span>
						<span class="t2">2017-08-10</span>
						<span class="t3">审核中</span>
					</li>
					<li>
						<span class="t1">1000</span>
						<span class="t2">2017-08-10</span>
						<span class="t3">审核中</span>
					</li>
					<li>
						<span class="t1">1000</span>
						<span class="t2">2017-08-10</span>
						<span class="t3">审核中</span>
					</li>
					<li>
						<span class="t1">1000</span>
						<span class="t2">2017-08-10</span>
						<span class="t3">审核中</span>
					</li>
					<li>
						<span class="t1">1000</span>
						<span class="t2">2017-08-10</span>
						<span class="t3">审核中</span>
					</li>
					<li>
						<span class="t1">1000</span>
						<span class="t2">2017-08-10</span>
						<span class="t3">审核中</span>
					</li>
					<li>
						<span class="t1">1000</span>
						<span class="t2">2017-08-10</span>
						<span class="t3">审核中</span>
					</li>
				</ul>
				<p class="loading"></p>
				<p class="noMore">--我们是有底线的--</p>
			</div>
			<div class="clickBox">
				<div class="clickBg"></div>
				<div class="clickInfo">
					<p class="closeCash">取消申请</p>
					<p class="close">取消</p>	
				</div>
			</div>
		</section>
		
		<footer class="footer">
			<nav class="nav">
				<ul>
					<li class="active">
						<a href="">
							<span class="navA"></span>
							<p>发现</p>
						</a>
					</li>
					<li>
						<a href="">
							<span class="navB"></span>
							<p>圈子</p>
						</a>
					</li>
					<li>
						<a href="">
							<span class="navC"></span>
							<p>阅读</p>
						</a>
					</li>
					<li>
						<a href="">
							<span class="navD"></span>
							<p>我</p>
						</a>
					</li>
				</ul>
			</nav>
		</footer>
	</div>
</body>
<script src='../js/jquery-1.9.1.js'></script>
<script type="text/javascript">
	$(function(){

		//点击弹出取消窗口
		$(document).on('click','.info ul li',function(){
			$('.clickBox').show();
		})

		//点击关闭窗口
		$('.clickBox .close').click(function(){
			$('.clickBox').hide();
		})

		//下拉加载更多
		var end=1;//为1时，下拉才加载更多
  		var i=0;//测试使用，判断加载多少次
  		var li='<li>'+
					'<span class="t1">1000</span>'+
					'<span class="t2">2017-08-10</span>'+
					'<span class="t3">审核中</span>'+
				'</li>';

        $(window).bind("scroll",function(){
        	if($(document).scrollTop()>0){
        		if($(document).scrollTop() + $(window).height() > $(document).height() - 100 && end != 0)// 接近底部100px
	            {
	            	end=0;
	                $('.loading').show();
	                setTimeout(function(){
	                    if(i>20){
	                    	end=0;
	                    	$('.loading').hide();
	                    	$('.noMore').show();
	                    	return false;
	                    };
	                    $('.info ul').append(li);
	                    $('.loading').hide();
	                    i++;
	                    end=1;
	                },1000)
	            }
        	}
        });
	})
</script>
</html>